﻿@model Gfw.Web.Models.Account.CashQueryCmpModel
@{
    ViewBag.Title = "会员TX审核 -- 用户名：" + ViewBag.LoginName;
    Layout = "~/Views/Shared/_LayoutContent.cshtml";
}

<fieldset>
    <legend>会员申请TX信息</legend>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.LoginName)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.LoginName)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.BankUserName)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.BankUserName)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.BankName)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.BankName)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.BankCardNo)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.BankCardNo)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Money)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Money)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.RequireDate)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.RequireDate)
    </div>
</fieldset>

@using (Html.BeginForm(new { applyDate = Model.RequireDate, start = ViewBag.StartDate, end = ViewBag.EndDate }))
{
    @Html.ValidationSummary(true)

    @Html.HiddenFor(model => model.UserID)
    @Html.HiddenFor(model => model.LoginName)
    @Html.HiddenFor(model => model.BankUserName)
    @Html.HiddenFor(model => model.BankName)
    @Html.HiddenFor(model => model.BankCardNo)
    @Html.HiddenFor(model => model.Money)
    @Html.HiddenFor(model => model.Status)
    @*@Html.HiddenFor(model => model.RequireDate)*@ @*要单独传时间参数，否则执行不了 HttpPost！*@

    <fieldset>
        <legend>审核信息</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.BankSerialNo)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.BankSerialNo)
            @Html.ValidationMessageFor(model => model.BankSerialNo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TradeAbstract)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.TradeAbstract)
            @Html.ValidationMessageFor(model => model.TradeAbstract)
        </div>

        <p>
            <input type="submit" value="&nbsp;&nbsp;&nbsp;审核通过&#013;且已转账" name="check" onclick="this.disabled = true; this.form.submit();"/>
            <input type="submit" value="审核不通过" name="check" style="height:40px" onclick="this.disabled = true; this.form.submit();"/>
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("返回TX查询", "CashIndex", new { start = ViewBag.StartDate == null ? null : ViewBag.StartDate.ToString("yyyy-MM-dd"), 
        end = ViewBag.EndDate == null ? null : ViewBag.EndDate.ToString("yyyy-MM-dd")})
</div>


@{
    if(ViewBag.Done && ViewBag.Check != null)
    {
        <div id="dialog" title="Dialog Title">
            <h5 style="color:Red">@ViewBag.Check ?</h5>
            <div>
                @Html.ActionLink("确认", "CashCheckConfirm", new { userID = Model.UserID, applyDate = Model.RequireDate, 
                    count = Model.Money, isCheckPass = (@ViewBag.Check as string).Contains("审核通过") ? true : false, 
                    start = ViewBag.StartDate, end = ViewBag.EndDate})
                &nbsp;
                <button onclick="javascript:closedialog()">取消</button>
            </div>
        </div>
    <script type="text/javascript">

        $(document).ready(function () {
            $("#dialog").dialog({ title: "操作提示" ,modal: true });
        });
        
        function closedialog() {
            $("#dialog").dialog("close");
        }
    </script>
    }
}


@section Scripts {
    @System.Web.Optimization.Scripts.Render("~/bundles/jqueryval")
}
